<?php
include "../../public/common/config.php";

$code = $_GET['code'];
$status_id = $_GET['status_id'];

$sql = "select * from status";
$result = mysql_query($sql);
?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../public/css/common.css"/>
	</head>
	<body>
		<div class="main">
			<form action="update.php" method="post">
				<p>
					<label>订单号：</label>
					<input type="text" name="code" value="<?php echo $code?>" /></p>
				<p>
					<label>选择状态：</label>
					<select name="status_id">
						<?php
							while($row = mysql_fetch_assoc($result)){
								if($row[id] == $status_id){
									echo "<option selected value='{$row['id']}'>{$row['name']}</option>";
								}else{
									echo "<option value='{$row['id']}'>{$row['name']}</option>";
								}							
							}						
						?>					
					</select>
				</p>
				<p><input type="submit" value="修改"/></p>
			</form>
		</div>
	</body>
	
</html>